<template>
	<view style="text-align: center;">
		<u-toast ref="uToast"></u-toast>
		<!-- <view class="">选择预约类型</view> -->
		<view v-for="(i,index) in type" :key="index" class="AA" @click="getnum(i,index)">
			<h2 class="type">
				{{i.name}}
			</h2>
			<view class="type2">
			<image src="../../static/position.png" mode="" class="Icon" style="margin-top: 5rpx;">{{i.a}}</image>
			
			</view>
			<view class="type2">
			<image src="../../static/phone.png" class="Icon" mode="">{{i.b}}</image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type:[
					{
						name:'在线问诊',
						a:'',
						b:''
					},
					{
						name:'门诊预约',
						a:'广西南宁市青秀区中泰路3号2号楼102号门诊部',
						b:'19977168339'
					},
					{
						name:'理疗预约',
						a:'广西南宁市青秀区中泰路3号2号楼102号理疗部',
						b:'19977168339'
					}
				]
			}
		},
		methods:{
			getnum(e,b) {
				if(b == 0) {
					this.$refs.uToast.show({
						type:'warning',
						message:'该功能暂未开放'
					})
				} else {
					this.$store.commit('get',b)
					uni.navigateTo({
						url:'/pages/doctor/doctor'
					})
				}
				
			}
		}
	}
</script>

<style scoped>
	.AA{
		width: 90%;
		border-radius: 40rpx;
		background-color: #78c0ff;
		color: white;
		margin:30rpx auto;
		
	}
	.type {
		padding: 30rpx 0 10rpx 0;
	}
	.type2 {
		margin: auto;
		width: 80%;
		padding: 20rpx 0;
	}
	.AA:active {
		background-color: lightblue;
	}
	.Icon{
		width: 45rpx;height: 45rpx;
		margin-right: 10rpx;
	}
</style>